home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
3_7.lha
/
3_7
/
3_7e.c
< prev
next >
Wrap
Text File
|
1993-08-08
|
345b
|
19 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
/ Copy the string s2 into s1.
/ Version 2
oid strncpy(char *s1, int maxlen, const char *s2)
if (s1 && s2)
{
while (--maxlen)
if (!(*s1++ = *s2++))
return;
if (maxlen > 0)
*s1 = '\0';
}